import requests
from comment.get_header_tools import get_req_header


def get_emp_id():
    req_header = get_req_header()
    resp = requests.post(url="http://ihrm2-test.itheima.net/api/company/department",
                        headers=req_header, json={"name": "测试部", "code": "00001"})
    dep_id = resp.json().get("data").get("id")
    return dep_id


if __name__ == '__main__':
    a = get_emp_id()
    print(a)